package org.kmfdm.horrorscope.service.beans;

import java.util.List;

import org.kmfdm.horrorscope.core.dao.UserDAO;
import org.kmfdm.horrorscope.metamodel.User;
import org.kmfdm.horrorscope.service.Login;

public class LoginImpl implements Login {

	private UserDAO daoU;
	
	public User login(String user, String pass){
		List<User> res = daoU.checkUserPass(user, pass);
			if(!res.isEmpty()){
				return res.get(0);
			}
		return null;
		
		
		
	}

	public UserDAO getDaoU() {
		return daoU;
	}

	public void setDaoU(UserDAO daoU) {
		this.daoU = daoU;
	}
}
